package com.sc.nft.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.EcologyCastConf;
import com.sc.nft.entity.UserInfo;
import com.sc.nft.entity.vo.ecology.*;
import com.sc.nft.enums.UserEcologyExpenditureTypeEnum;
import com.sc.nft.exception.GlobalException;

import java.util.List;

public interface EcologyCastService {


    /**
     * 获取生态铸造配置
     *
     * @param id
     * @return
     */
    EcologyCastConf getById(Long id);

    /**
     * 获取生态铸造列表
     *
     * @return
     */
    Page<EcologyCastListVO> list(Integer pageNo, Integer pageSize,Long userCreatorId);

    /**
     * 获取生态铸造详情
     *
     * @param id
     * @return
     */
    EcologyCastDetailsVO details(Long id, UserInfo user);

    /**
     * 获取铸造所需数量
     *
     * @param id
     * @param count
     * @param user
     * @return
     */
    List<EcologyCastWayVO> preExpendDetails(Long id, Integer count, UserInfo user);

    /**
     * 铸造
     *
     * @param id
     * @param count
     * @param user
     */
    void expend(Long id, Integer count, UserInfo user,Long wayId) throws GlobalException;

    /**
     * 获取铸造消耗记录
     *
     * @param user
     * @param pageNo
     * @param pageSize
     * @return
     */
    Page<ExpendEcologyCastRecordsVO> expendRecords(UserInfo user, Integer pageNo, Integer pageSize);

    /**
     * 分页获取收入明细
     *
     * @param user
     * @param pageNo
     * @param pageSize
     * @return
     */
    Page<EcologyExpenditureRecordVO> ecologyExpenditureRecord(UserInfo user, Integer pageNo, Integer pageSize);

    /**
     * 分页获取支出名细
     *
     * @param user
     * @param pageNo
     * @param pageSize
     * @return
     */
    Page<UserEcologyDetailVO> userEcologyDetail(UserInfo user, Integer pageNo, Integer pageSize);

    /**
     * 分页获取用户收入记录列表(汇总)
     *
     * @param user
     * @param type
     * @param pageNo
     * @param pageSize
     * @return
     */
    Page<UserEcologyExpenditureRecordPageVO> userEcologyExpenditureRecordPage(UserInfo user, UserEcologyExpenditureTypeEnum type, Integer pageNo, Integer pageSize,Long linkId);

    /**
     * 分页获取用户收入记录明细
     *
     * @param user
     * @param type
     * @param dateTime
     * @param pageNo
     * @param pageSize
     * @return
     */
    Page<EcologyExpenditureRecordVO> userEcologyExpenditureRecordDetailsPage(UserInfo user, UserEcologyExpenditureTypeEnum type, Integer dateTime, Integer pageNo, Integer pageSize,Long linkId);

    /**
     * 铸造记录列表
     *
     * @param user
     * @param pageNo
     * @param pageSize
     * @return
     */
    Page<UserExpendRecordsPageVO> expendRecordsPage(UserInfo user, Integer pageNo, Integer pageSize,Long userCreatorId);

    /**
     * 铸造记录详情
     *
     * @param user
     * @param id
     * @return
     */
    List<ExpendEcologyCastRecordsVO> expendRecordsDetails(UserInfo user, Long id);


    /**
     * 用户铸造上限记录
     *
     * @param user
     * @param pageNo
     * @param pageSize
     * @return
     */
    Page<UserEcologyCastUpperLimitDetailsVO> userEcologyCastUpperLimitDetails(UserInfo user, Long id, Integer pageNo, Integer pageSize);


}
